from pydantic import BaseModel

class ProfileFieldsBase(BaseModel):
    field: str
    available: bool
    title: str
    description: str
    displayorder: int
    required: bool
    unchangeable: bool
    showinregister: bool
    field_length: int

class ProfileFieldsCreate(ProfileFieldsBase):
    pass

class ProfileFields(ProfileFieldsBase):
    id: int

    class Config:
        from_attributes = True

class QrcodeBase(BaseModel):
    Uniacid: int
    Acid: int
    Type: str
    Extra: int
    Qrcid: int
    SceneStr: str
    Name: str
    Keyword: str
    Model: int
    Ticket: str
    Url: str
    Expire: int
    Subnum: int
    Createtime: int
    Status: int

class QrcodeCreate(QrcodeBase):
    pass

class Qrcode(QrcodeBase):
    Id: int

    class Config:
        orm_mode = True

class QrcodeStatBase(BaseModel):
    Uniacid: int
    Acid: int
    Qid: int
    Openid: str
    Type: int
    Qrcid: int
    SceneStr: str
    Name: str
    Createtime: int

class QrcodeStatCreate(QrcodeStatBase):
    pass

class QrcodeStat(QrcodeStatBase):
    Id: int

    class Config:
        orm_mode = True